using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using Sis.Entities;
using Sis.Repository.Mapping;

namespace Sis.Repository
{
    public partial class SIGAVATFINALContext : DbContext
    {
        static SIGAVATFINALContext()
        {
            Database.SetInitializer<SIGAVATFINALContext>(
                null
                //new DropCreateDatabaseAlways<SIGAVATFINALContext>()
                );
        }

        public SIGAVATFINALContext()
            : base("Name=SIGAVATFINALContext")
        {
        }

        public DbSet<CuotaIsla> CuotaIslas { get; set; }
        public DbSet<IslaVenta> IslaVentas { get; set; }
        public DbSet<Promotor> Promotors { get; set; }
        public DbSet<sysdiagram> sysdiagrams { get; set; }
        public DbSet<VentaRegistrada> VentaRegistradas { get; set; }
        public DbSet<Ubigeo> Ubigos { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new CuotaIslaMap());
            modelBuilder.Configurations.Add(new IslaVentaMap());
            modelBuilder.Configurations.Add(new PromotorMap());
            modelBuilder.Configurations.Add(new sysdiagramMap());
            modelBuilder.Configurations.Add(new VentaRegistradaMap());
            modelBuilder.Configurations.Add(new UbigeoMap());
        }
    }
}
